from generator.gen import Gen
from dto.param import Param


class GenDefault(Gen):
    def __init__(self, param: Param = None):
        Gen.__init__(self, param)

    def check(self, c, charset):
        """
        :brief:   Because the font library in Windows OS is encoded with Unicode almost, so we get
                  the font image through converting the other charset to Unicode
        """
        # convert to Unicode
        return ord(str(c.to_bytes(2, byteorder='big'), encoding=charset))
